package book;

import java.time.format.DateTimeFormatter;

public class PairOfUidAndBookId {
    private int userId;
    private int bookId;
    public PairOfUidAndBookId(){
    }
    public PairOfUidAndBookId(int userId, int bookId) {
        this.userId = userId;
        this.bookId = bookId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getBookId() {
        return bookId;
    }

    public void setBookId(int bookId) {
        this.bookId = bookId;
    }
    public String toJson(){
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(userId).append(",");
        stringBuilder.append(bookId);
        return stringBuilder.toString();
    }

    @Override
    public String toString() {
        return "PairOfUidAndBookId{" +
                "userId=" + userId +
                ", bookId=" + bookId +
                '}';
    }
}
